a11y: Rename some methods
authorMatthias Clasen <mclasen@redhat.com>
Mon, 19 Oct 2020 16:58:29 +0000 (12:58 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 19 Oct 2020 16:58:29 +0000 (12:58 -0400)
Our EditableText implementation works fine for any
editable, so don't name the functions in a way that
looks like they are only for entries.

gtk/a11y/gtkatspieditabletext.c

index 63187f54d924be889a960b55034ed7edfa59d1c0..20c1f1d86ab8e451ac360944075bb3617602f48f 100644 (file)
@@ -59,14 +59,14 @@ text_received (GObject      *source,
 }
 
 static void
-entry_handle_method (GDBusConnection       *connection,
-                     const gchar           *sender,
-                     const gchar           *object_path,
-                     const gchar           *interface_name,
-                     const gchar           *method_name,
-                     GVariant              *parameters,
-                     GDBusMethodInvocation *invocation,
-                     gpointer               user_data)
+editable_handle_method (GDBusConnection       *connection,
+                        const gchar           *sender,
+                        const gchar           *object_path,
+                        const gchar           *interface_name,
+                        const gchar           *method_name,
+                        GVariant              *parameters,
+                        GDBusMethodInvocation *invocation,
+                        gpointer               user_data)
 {
   GtkATContext *self = user_data;
   GtkAccessible *accessible = gtk_at_context_get_accessible (self);
@@ -175,8 +175,8 @@ entry_handle_method (GDBusConnection       *connection,
     }
 }
 
-static const GDBusInterfaceVTable entry_vtable = {
-  entry_handle_method,
+static const GDBusInterfaceVTable editable_vtable = {
+  editable_handle_method,
   NULL,
 };
 
@@ -348,11 +348,8 @@ static const GDBusInterfaceVTable text_view_vtable = {
 const GDBusInterfaceVTable *
 gtk_atspi_get_editable_text_vtable (GtkAccessible *accessible)
 {
-  if (GTK_IS_ENTRY (accessible) ||
-      GTK_IS_SEARCH_ENTRY (accessible) ||
-      GTK_IS_PASSWORD_ENTRY (accessible) ||
-      GTK_IS_SPIN_BUTTON (accessible))
-    return &entry_vtable;
+  if (GTK_IS_EDITABLE (accessible))
+    return &editable_vtable;
   else if (GTK_IS_TEXT_VIEW (accessible))
     return &text_view_vtable;